import Api from "../../request/api"

export default {
    namespaced: true,
    state: {
        catelist: []
    },
    mutations: {
        initCatelist(state, payload) {
            state.catelist = payload
        }
    },
    actions: {
        getcatelist({
            commit
        }) {
            Api.catelist({
                commit
            }).then(res => {
                if (res.code == 200) {
                    commit("initCatelist", res.list)
                }
            })
        }
    },
    getters: {},

}